﻿namespace Bundler
{
    using System;

    public class BundleResponse
    {
        #region Public Properties

        public Bundle Bundle { get; set; }

        public string Content { get; set; }

        public Action RequestAction { get; set; }

        public bool Processed { get; set; }

        private int? _alias;
        public int Alias
        {
            get
            {
                if (Processed && !_alias.HasValue)
                {
                    _alias = Content.GetHashCode();
                }
                return _alias.HasValue ? _alias.Value : 0;
            }
        }

        #endregion
    }
}